package cn.zjweu.controller;

import cn.zjweu.service.MenuService;
import cn.zjweu.utils.ResultUtils;
import cn.zjweu.utils.ResultVo;
import cn.zjweu.utils.StatusCode;
import io.swagger.annotations.Api;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "Menu测试接口")
@RestController
@CrossOrigin
@RequestMapping("/api/v1/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/geAllMenus")
    public ResultVo getAllMenu(@RequestParam("commentType")String commentType, @RequestParam("menuId") Long menuId) {

        return ResultUtils.success("获取成功", StatusCode.SUCCESS_CODE, menuService.getAllMenus(commentType, menuId));
    }
}
